package com.rockcent.mall.lib.dto;

import com.rockcent.common.domain.DtoEntity;
import com.rockcent.common.utils.BigDecimalUtils;

/**
 * Created by DK on 16/11/19.
 */
public class MerchantFundDto extends DtoEntity {

    //总金额
    private Double totalAmount;
    //冻结金额
    private Double frozen;
    //可用金额
    private Double availableAmount;
    //商户id
    private Long merchantId;
    //平台id
    private Long mallId;
    //商家名称
    private String merchantName;
    //总收入
    private Double totalIncome = 0D;
    //总支出
    private Double totalExpend = 0D;

    //父ID
    private Long parentId;

    //商家帐号(登录帐号)
    private String merchantAccount;

    public Double getTotalAmount() {
        return BigDecimalUtils.setScale(totalAmount);
    }

    public void setTotalAmount(Double totalAmount) {
        this.totalAmount = totalAmount;
    }

    public Double getFrozen() {
        return BigDecimalUtils.setScale(frozen);
    }

    public void setFrozen(Double frozen) {
        this.frozen = frozen;
    }

    public Double getAvailableAmount() {
        return BigDecimalUtils.setScale(availableAmount);
    }

    public void setAvailableAmount(Double availableAmount) {
        this.availableAmount = availableAmount;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public Double getTotalIncome() {
        return BigDecimalUtils.setScale(totalIncome);
    }

    public void setTotalIncome(Double totalIncome) {
        this.totalIncome = totalIncome;
    }

    public Double getTotalExpend() {
        return BigDecimalUtils.setScale(totalExpend);
    }

    public void setTotalExpend(Double totalExpend) {
        this.totalExpend = totalExpend;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getMerchantAccount() {
        return merchantAccount;
    }

    public void setMerchantAccount(String merchantAccount) {
        this.merchantAccount = merchantAccount;
    }

    @Override
    public String toString() {
        return "MerchantFundDto{" +
                "totalAmount=" + totalAmount +
                ", frozen=" + frozen +
                ", availableAmount=" + availableAmount +
                ", merchantId=" + merchantId +
                ", mallId=" + mallId +
                ", merchantName='" + merchantName + '\'' +
                ", totalIncome=" + totalIncome +
                ", totalExpend=" + totalExpend +
                ", parentId=" + parentId +
                ", merchantAccount='" + merchantAccount + '\'' +
                '}';
    }
}
